<!-- 头部 -->
<link rel="stylesheet" href="./resource/css/showBo.css">
<?php $user_info = session_get(UserEnum::USER_INFO_SESSION_KEY);?>
<div class="head">
    <div class="top">
        <div class="main">
            <div class="left">
                <span>欢迎来到央票通 !</span>
                <span class="tel">服务热线 : 4000-678-797</span>
            </div>
            <div class="right nav-top">
                <ul>
                    <li><a href="javascript:void(0);">ERP系统</a><span>|</span></li>
                    <li><a href="/top_flow">贴现流程</a><span>|</span></li>
                    <li><a href="/top_enter_ypt">出票企业</a><span>|</span></li>
                    <li><a href="javascript:void(0);">商业合作</a><span>|</span></li>
                    <li><a href="javascript:void(0);">在线客服</a><span>|</span></li>
                    <li><a href="javascript:void(0);">移动端</a></li>
                </ul>
            </div>
        </div>
    </div>
    <div class="nav">
        <div class="main">
            <div class="logo">
                <a href="/index.php"><img src="./resource/img/logo.png" alt=""></a>
            </div>
            <div class="nav-mid">
                <ul>
                    <li><a href="/index.php">首页</a></li>
                    <li><a href="/project_list">票据理财</a></li>
                    <li><a href="/financing">持票融资</a></li>
                    <li><a href="/abouts_intro">关于我们</a></li>
                </ul>
            </div>
            <div class="btn-box">
                @if(!session_get(UserEnum::USER_INFO_USER_ID))
                <a href="/login" class="btn btn-login">登录</a>
                <a href="/register" class="btn btn-register">注册</a>
                @else
                    <div class="btn-register">
                        <a href="javascript:;"><img src="{{$user_info->avatar}}" alt=""></a>
                        <a href="/user_account">
                            @if(preg_match('/^1[34578]\d{9}$/',session_get(UserEnum::USER_INFO_USER_NAME)))
                            {{substr_replace($user_info->mobile,'****',3,4)}}
                                @else
                                {{$user_info->user_name}}
                            @endif
                        </a>
                        {{--<a href="javascript:if(confirm('确定退出吗?'))location='/login_out'" class="last">退出</a>--}}
                        <a href="javascript:;" class="last" id="out">退出</a>
                    </div>
                @endif
            </div>
        </div>
    </div>
</div>
<script src="./resource/js/showBo.js"></script>
<script>
    var out = document.getElementById('out');
    out.onclick = function(){
        Showbo.Msg.confirm('是否确认退出？',function(s){
            if (s=='yes'){
               window.location.href='/login_out';
            }else{
                return false;
            }
        })
    };
</script>

